package cbfg.http.subscribe

import cbfg.http.constant.ThreadMode

interface Observable<T> {
    /**
     * 执行线程：默认 [ThreadMode.BACKGROUND]
     * @return
     */
    fun subscribeOn(threadMode: ThreadMode): Observable<T>

    /**
     * 回调线程：默认 [ThreadMode.MAIN]
     * @return
     */
    fun observeOn(threadMode: ThreadMode): Observable<T>

    fun subscribe(observer: Observer<T>)
}